package org.codefinger.dao.callback;

import java.sql.ResultSet;

import org.codefinger.dao.impl.ResultSetCallback;

public class DoubleQueryCallback implements ResultSetCallback<Double> {

	public static final DoubleQueryCallback	INSTANCE	= new DoubleQueryCallback();

	private DoubleQueryCallback() {

	}

	@Override
	public Double getResult(ResultSet resultSet, String[] aliases)
			throws Throwable {
		if (resultSet.next()) {
			return resultSet.getDouble(1);
		}
		return null;
	}

}
